//
//  MidViewController.m
//  必争医疗
//
//  Created by 8号球 on 14-11-19.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "MidViewController.h"

@interface MidViewController () 

@end

@implementation MidViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationController.navigationBar.Hidden = NO;
    self.tabBarController.tabBar.hidden = YES;
    self.view.backgroundColor = [UIColor grayColor];
}
- (void)creatButtonItem :(NSString *)str
{
    UIButton *bl = [UIButton buttonWithType:UIButtonTypeCustom];
    [bl setTitle:str forState:UIControlStateNormal];
    [bl setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    bl.frame = CGRectMake(0, 0, 120, 30);
    [bl addTarget:self action:@selector(L:) forControlEvents:UIControlEventTouchUpInside];
    UIButton *br = [UIButton buttonWithType:UIButtonTypeCustom];
    [br setTitle:@"推送" forState:UIControlStateNormal];
    [br setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    br.backgroundColor = [UIColor greenColor];
    br.frame = CGRectMake(0, 0, 60, 30);
    [br addTarget:self action:@selector(R:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *left = [[[UIBarButtonItem alloc]initWithCustomView:bl]autorelease];
    UIBarButtonItem *right = [[[UIBarButtonItem alloc]initWithCustomView:br]autorelease];
    self.navigationItem.leftBarButtonItem = left;
    self.navigationItem.rightBarButtonItem = right;
}
- (void)L :(id)sender
{
    [self.navigationController.navigationBar setHidden:YES];
    [self.tabBarController.tabBar setHidden:NO];
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)R :(id)sender
{
    
}
- (void)creatView :(NSString *)url
{
    UIWebView *wv = [[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, 375, 651)]autorelease];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
    [(UIScrollView *)[[wv subviews]objectAtIndex:0] setBounces:NO];
    [self.view addSubview:wv];
    [wv loadRequest:request];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
